package top.pmwly.oauth2.pojo;

import org.springframework.security.core.Authentication;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;

import java.util.Collection;
import java.util.List;

/**
 * @author Herther
 * @version 1.0.0
 * @ClassName User.java
 * @Description 自定义USer类 实现了UserDetails
 * @createTime 2021年08月21日 17:19:00
 */
public class User implements UserDetails {

    private String username;
    private String password;
    private List<GrantedAuthority> authentications;

    public User(String username, String password, List<GrantedAuthority> authentications) {
        this.username = username;
        this.password = password;
        this.authentications = authentications;
    }

    @Override
    public Collection<? extends GrantedAuthority> getAuthorities() {
        return null;
    }

    @Override
    public String getPassword() {
        return null;
    }

    @Override
    public String getUsername() {
        return null;
    }

    @Override
    public boolean isAccountNonExpired() {
        return false;
    }

    @Override
    public boolean isAccountNonLocked() {
        return false;
    }

    @Override
    public boolean isCredentialsNonExpired() {
        return false;
    }

    @Override
    public boolean isEnabled() {
        return false;
    }
}
